package com.test.pattern.builder.demo1;

/**
 * @ClassName: Director
 * @description: 建造者模式指挥者角色
 * @author: Mr du
 * @create: 2024-02-17 18:28
 */
public class Director {

    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Bike construct() {
        builder.buildFrame();
        builder.buildSeat();
        return builder.createBike();
    }
}
